import { observable, action } from 'mobx';

class appStore {
  @observable app = {
    token: sessionStorage.getItem('wl-token-key'),
    loginUser: {}
  }

  @action setToken(token) {
    this.app.token = token;
    sessionStorage.setItem('wl-token-key', token);
  }

  @action setLoginUser(user) {
    this.app.loginUser = user;
  }
}

export default new appStore();